<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="stylesheet" type="text/css" href="/skin/css/amazeui.min1.css" />
<link href="/user/css/style.css" rel="stylesheet" type="text/css" />
<script src="/user/js/jquery.js"></script>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title>订单核销-会员中心</title>
</head>
<body class="body">
<div class="main">
<div class="editzl">
	<header id="header">
	<section class="head-b head-b1">
		<span class="u-left"><a href="javascript:history.go(-1);" class="back"><img src="/skin/img/back.png"/></a></span>
		<h1 id="t0">订单核销</h1>
		<div class="u-right" href="#">
			<a href="hxlist.php" class="right">核销记录</a>
		</div>
	</section>
</header>
	<form class="edit1" action="?" method="get">
		<div id="ziliao">		
		<div class="z-listHx">
            <input type="text" name="code" placeholder="请输入8位核销码" />
            <input type="submit" value="查询订单" />
		</div>
	</div>
	</form>
	{if($olist)}
	<div class="ding-list-li hxDinglist" style="padding:10px;">
			
		{for $glist $i}
		<a>
			<img src="{$glist[$i][thumb]}" />
			<div class="ding-list-z">
				<div class="name">{$glist[$i][name]}</div>			
				<div class="span1">
					<div class="jiage">
						￥<span>{$glist[$i][price]}</span>
					</div>
					<div class="num">X{$glist[$i][num]}</div>
				</div>
			</div>
		</a> 
		{/for}
		<div class="he">客户信息：{$olist[tname]}[{$olist[phone]}]
			<br />
			{if($olist['endtime'])}
			核销时间：{$olist[endtime]}
			{/if}
		</div>	
		{if($olist['type']==1 && $olist['state']==1)}
		<a class="hx xtj" style="color:#fff;text-align:center;display: inherit;width: 50%;line-height: 32px;padding:8px 0;" data-id="{$olist[hxcode]}">确认核销</a>
		{/if}
		
	</div>
	{/if}
</div>
</div>
<script>
   
	$(".hx").on("click",function(){
		var msg = confirm("确认核销该订单？");
		var oid = $(this).attr("data-id");
		if(msg==true){
			$.ajax({
				type:"post",
				dataType:"json",
				url:"/Moudelu.php?m=g&a=hexiao",
				data:"oid="+oid,
				success:function(d){					
					if(d[0]==0){
						alert(d[1]);
					}else{
						alert(d[1]);
						window.location.href='hxlist.php';
					}
				}
			});
		}
	});
</script>
<script>
	$(function () {
		if (/LT-APP/.test(navigator.userAgent)) {
		     jsBridge.requestPermissions([ "ReadPhotos" ]);
		    $(".saoma").show();
		} else {
		   
		}
	});
</script>
{include(foot)}
</body>
</html>